#ifndef GAMESTATE_MASTER_MAINMENU_H
#define GAMESTATE_MASTER_MAINMENU_H


#include "Engine/Backbone.h"
#include "Interface/Menu.h"
#include "Engine/Visual.h"
#include "Engine/Reason.h"
#include "Engine/Resource/Graphic.h"
#include "Engine/Kinetic/Animation.h"
#include <string>

namespace Misc { struct Frame; } 

namespace GameState {

namespace Master {

class MasterEntry : public Interface::Menu::MenuEntry, public Engine::Visual, public Engine::Reason {
  protected:
	Engine::Resource::Graphic entryFg; 
	Engine::Kinetic::Animation menuAnimation; 
	bool focused; 

  public:
	MasterEntry(const Misc::Frame & frame, std::string graphicName); 
	virtual Engine::Resource::GraphicList display(); // Menu entry was selected
	virtual void pulse(int delta); 
	virtual void haveFocus(bool focused); 
	virtual ~MasterEntry(); 
};
class EntryBegin : public MasterEntry {
  public:
	EntryBegin(const Misc::Frame & frame); 
	inline void select(); 
};
inline void EntryBegin::select() {
	Engine::Backbone::changeContext("gameplay");
}

class EntryExit : public MasterEntry {
  public:
	EntryExit(const Misc::Frame & frame); 
	inline void select(); 
};
inline void EntryExit::select() {
	std::exit(0); // sry :/
}

class EntryOptions : public MasterEntry {
  public:
	EntryOptions(const Misc::Frame & frame); 
	inline void select(); 
};
inline void EntryOptions::select() {
	Engine::Backbone::changeContext("optionsGameState");
}


} // namespace GameState::Master

} // namespace GameState
#endif
